package com.aijk.web.admin.controller.openapi.entity;

import java.io.Serializable;

/**
 * Created by iscdw on 2016/3/11.
 */
public class ApiResponse implements Serializable {
    private String code;
    /**
     * 内部异常信息，供调用方参考
     */
    private String err;
    private String msg;
    private Object data;

    public ApiResponse() {
        this.code = "0";
        this.msg = "请求成功";
    }

    public ApiResponse(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public ApiResponse(String code, String msg, String err) {
        this.code = code;
        this.msg = msg;
        this.err = err;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getErr() {
        return err;
    }

    public void setErr(String err) {
        this.err = err;
    }

    @Override
    public String toString() {
        return "ApiResponse{" +
                "code='" + code + '\'' +
                ", err='" + err + '\'' +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }
}
